PROJECT("MAXFLOW")

CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0 FATAL_ERROR)

if(COMMAND cmake_policy)
  cmake_policy(SET CMP0003 NEW)
  cmake_policy(SET CMP0012 NEW)
endif(COMMAND cmake_policy)

SET(SOURCES maxflow.cpp graph.cpp wrapper.cpp) 
SET(LIBRARY_NAME maxflow)

FIND_PACKAGE( Boost 1.46.0 COMPONENTS python REQUIRED)

FIND_PACKAGE(PythonLibs REQUIRED)
INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH})
ADD_LIBRARY(${LIBRARY_NAME} MODULE ${SOURCES})
SET_TARGET_PROPERTIES(${LIBRARY_NAME} PROPERTIES PREFIX "")
TARGET_LINK_LIBRARIES(${LIBRARY_NAME}  ${Boost_PYTHON_LIBRARY} ${PYTHON_LIBRARIES} )

